home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d936.lha / TKEd / Rexx / StripBlankLines.tked < prev    next >
Text File  |  1993-12-20  |  1KB  |  29 lines

  1. /** ----------------------------------------------------------------
  2.  ** ARexx program to delete all blank lines of text 
  3.  ** ----------------------------------------------------------------
  4.  ** AREXX-Programm, welches aus einem Texte alle Leerzeilen entfernt
  5.  ** ----------------------------------------------------------------
  6.  **
  7.  ** © Tom Kroener '92
  8.  **
  9.  **/
  10.  
  11. options results
  12. address 'TKEd.1'                /* Portname of the first started TKEd */
  13.  
  14. BeginOfFile                     /* Go to start */
  15. LastLine                        /* Get number of the last line */
  16. LastLineNr = result
  17.  
  18. LineNr = 0                      /* Counter for the lines */
  19. DO WHILE LineNr <= LastLineNr   /* Counts until it reaches the last line */
  20.   GetLineLen                    /* Returns the length of the current line */
  21.   IF result = 0                 /* If blank line then delete */
  22.     THEN DeleteLine
  23.     ELSE Cursor "DOWN"          /* Goto next line */
  24.   LineNr = LineNr + 1           /* Increment linecounter */
  25. END
  26.  
  27. EXIT 0
  28.  
  29.